package com.cloud.entity.mes;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

/**
 * 成品码表(MesPcbBarCode)实体类
 *
 * @author makejava
 * @since 2021-08-19 10:17:22
 */
@Data
@Table(name = "mes_pcb_barcode")
public class MesPcbBarCode implements Serializable {
    private static final long serialVersionUID = -57047433994022743L;
    /**
     * id
     */
    @Column(name = "id")
    @ApiModelProperty(value = "id")
    private String id;
    /**
     * 工厂id
     */
    @Column(name = "factory_id")
    @ApiModelProperty(value = "工厂id")
    private String factoryId;
    /**
     * 工位id
     */
    @Column(name = "station_id")
    @ApiModelProperty(value = "工位id")
    private String stationId;
    /**
     * 工单id
     */
    @Column(name = "task_id")
    @ApiModelProperty(value = "工单id")
    private String taskId;
    /**
     * 配件SN码
     */
    @Column(name = "sn_code")
    @ApiModelProperty(value = "配件SN码")
    private String snCode;
    /**
     * 产品编码
     */
    @Column(name = "product_code")
    @ApiModelProperty(value = "产品编码")
    private String productCode;
    /**
     * 包装使用状态0未使用 1已使用
     */
    @Column(name = "use_status")
    @ApiModelProperty(value = "包装使用状态0未使用 1已使用")
    private Integer useStatus;
    /**
     * 扫描工位
     */
    @Column(name = "scan_station")
    @ApiModelProperty(value = "扫描工位")
    private String scanStation;

    /**
     * 工步id
     */
    private String workStepId;
    /**
     * 条码日期
     */
    @Column(name = "barcode_date")
    @ApiModelProperty(value = "条码日期")
    private Date barcodeDate;

    public MesPcbBarCode(String taskId) {
        this.taskId = taskId;
        this.deleted = 0;
    }
    public MesPcbBarCode() {
    }

    /**
     * 创建人id
     */
    private String cdUserId;
    /**
     * 创建人名称
     */
    private String cdUserName;
    /**
     * 创建时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date cdTime;
    /**
     * 修改人id
     */
    protected String mdUserId;
    /**
     * 修改人名称
     */
    protected String mdUserName;
    /**
     * 修改时间
     */
    protected Date mdTime;
    /**
     * 删除标识 0否 1是
     */
    protected Integer deleted;
}
